Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redraw after local tasks complete #449

Merged
merged 1 commit into from
Jan 4, 2025
Merged

Redraw after local tasks complete #449

merged 1 commit into from
Jan 4, 2025

Conversation

LucasPickering
Copy link
Owner

@LucasPickering LucasPickering commented Jan 4, 2025

Description

Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.

This eliminates the 250ms delay between a local task completing and the next redraw. Redraws are only triggered by messages in the queue (and not events), so we can send an empty message to trigger a redraw.

I think it'd be a good idea to make all tasks run on the main thread, since we're heavily I/O bound anyway. Should cut down on wasted effort, and eliminate the Send bound on everything.

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

Changes to the core of the event loop are always risky. Mitigated with a whole bunch of existing tests.

QA

How did you test this?

Hit buttons and shit

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

This eliminates the 250ms delay between a local task completing and the next redraw. Redraws are only triggered by messages in the queue (and not events), so we can send an empty message to trigger a redraw.
@LucasPickering LucasPickering enabled auto-merge (rebase) January 4, 2025 16:28
@LucasPickering LucasPickering merged commit 7a20809 into 3.0 Jan 4, 2025
15 checks passed
@LucasPickering LucasPickering deleted the fast-redraw branch January 4, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant